package practice11;

import java.util.HashSet;
import java.util.Set;

public class Klass {
    private Integer number;
    private Person leader;
    private Set<Integer> list = new HashSet<>();


    public Klass(Integer number) {
        this.number = number;
    }

    public Integer getNumber() {
        return number;
    }

    public void setNumber(Integer number) {
        this.number = number;
    }

    public Person getLeader() {
        return leader;
    }

    public void setLeader(Person leader) {
        this.leader = leader;
    }

    @Override
    public String toString() {
        return "Klass{" +
                "number=" + number +
                ", leader=" + leader +
                '}';
    }

    public void assignLeader(Student jerry) {
        this.leader = jerry;
    }

    public void appendMember(Student jerry) {
        this.number++;
    }

    public String getDisplayName() {
        return "Class 2";
    }
}
